/**
 * Created with Intellij IDEA
 * Description
 * User:ASUS
 * Date:2024-07-26
 * Time:15:37
 */
public class Demo {
    public static void main(String[] args) {
        int n=1;
        int ret=factor(n);
        System.out.println("ret="+ret);
    }
    public static int factor(int n){
        if(n==1){
            return 1;
        }
        return n*factor(n-1);
    }
}
